import http from "@/http/http";

// 获取验证码
export const getCodeNumber = (phone) => {
    const url = `/login/send?phone=${phone}`
    return http.get(url)
}
// 注册接口
export const web_register = (params) => {
    const url = "/login/web_register"
    return http.post(url, params,)
}
// 登录
export const login_token = (params) => {
    const url = "/login/web_token"
    return http.post(url, params)

}
//忘记密码
export const forget_pw = (params) => {
    const url = "/login/forget_pw"
    return http.post(url, params)

}
export const getVipImage = () => {
    const url = "/webpage/card_list?page=1&size=10"
    return http.get(url)
}

export const getVipDetail = (id) => {
    const url = `/webpage/card_get?cardId=${id}`
    return http.get(url)
}
export const getHomeList = () => {
    const url = "/webpage/cinema_list?page=1&size=100"
    return http.get(url)
}

export const getFilmDetail = (id) => {
    const url = `/webpage/film_list?cinemaId=${id}`
    return http.get(url)
}

export const getSessionList = (cid, fid, time) => {
    const url = `/webpage/session_list?cinemaId=${cid}&filmId=${fid}&showDate=${time}`
    return http.get(url)
}

export const doAppointmentSession = (id) => {
    const url = `/webpage/reserve?sessionId=${id}`
    return http.get(url)
}

export const getAppointmentList = () => {
    const url = "/webpage/reserve_list?page=1&size=100"
    return http.get(url)
}

export const getAppointmentDetail = (id) => {
    const url = `/webpage/reserve_get?reserveId=${id}`
    return http.get(url)
}


export const getUserInfo = () => {
    const url = "/webpage/getinfo"
    return http.get(url)
}

export const doPostVip = (params) => {
    const url = "/webpage/open"
    return http.post(url, params)
}

